﻿using System.Diagnostics;
using System.Diagnostics.Contracts;

namespace Postnuclear
  {
  /// <summary>
  /// The extension methods for the <see cref="string"/>.
  /// </summary>  
  public static partial class ExtensionMethods
    {
    #region Public

    // Methods

    /// <summary>
    /// Determines whether the specified string "has any sense" (not null, not empty, not white space).
    /// </summary>
    /// <param name="value">The string.</param>
    /// <returns>
    /// <c>true</c> if the specified string "has sense"; otherwise, <c>false</c>.
    /// </returns>
    [Pure]
    [DebuggerHidden]
    public static bool HasSense(this string value)
      {
      return !(string.IsNullOrEmpty(value) || string.IsNullOrWhiteSpace(value));
      }

    #endregion
    }
  }